package version

import (
	"bytes"
	"compress/gzip"
	"fmt"
	"io"
	"strings"
)

func bindata_read(data []byte, name string) ([]byte, error) {
	gz, err := gzip.NewReader(bytes.NewBuffer(data))
	if err != nil {
		return nil, fmt.Errorf("Read %q: %v", name, err)
	}

	var buf bytes.Buffer
	_, err = io.Copy(&buf, gz)
	gz.Close()

	if err != nil {
		return nil, fmt.Errorf("Read %q: %v", name, err)
	}

	return buf.Bytes(), nil
}

var _version_creator = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x44\x8b\xbd\xaa\x83\x30\x14\xc7\xf7\xf3\x14\xff\x1b\x33\xe8\xbd\xe8\xc1\x07\x08\x5c\xe8\xde\xa1\x74\xab\x0e\x31\x3d\xa0\x20\x69\x89\x6d\xa5\x84\xbc\x7b\xd1\x82\xae\xbf\x8f\xec\x87\x9f\x53\xe0\x6e\xf0\x2c\xfe\x85\xce\x4e\x3d\xd1\x55\xdc\x68\x83\xa0\xb4\xb8\xdb\xf0\x30\x39\x74\xac\x99\x9b\x8a\x91\x50\x6c\x1a\x80\x97\x79\xaf\x07\x38\x1b\xc2\xdb\xd4\x74\x38\x9e\x4f\x46\xc7\x6c\xb9\x2f\xff\x6d\x2a\x6b\x1a\xc5\x6f\x64\xd1\x6d\x22\x2f\xb3\xd1\x79\xbe\xa3\xbf\xf5\x2f\x0a\xda\x91\xd1\xd1\xcb\xfc\x6d\x95\x8e\xab\xf8\x6d\x93\x22\x71\xfd\x0d\xa5\x40\xad\x01\x33\xb8\x4a\x8d\x53\x9f\x00\x00\x00\xff\xff\x56\xe4\xae\xce\xd0\x00\x00\x00")

func version_creator() ([]byte, error) {
	return bindata_read(
		_version_creator,
		"version/creator",
	)
}

var _version_version = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x2a\x33\xd0\x33\xd1\x33\x37\x04\x04\x00\x00\xff\xff\xb5\x08\x1c\xe4\x07\x00\x00\x00")

func version_version() ([]byte, error) {
	return bindata_read(
		_version_version,
		"version/version",
	)
}

// Asset loads and returns the asset for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func Asset(name string) ([]byte, error) {
	cannonicalName := strings.Replace(name, "\\", "/", -1)
	if f, ok := _bindata[cannonicalName]; ok {
		return f()
	}
	return nil, fmt.Errorf("Asset %s not found", name)
}

// AssetNames returns the names of the assets.
func AssetNames() []string {
	names := make([]string, 0, len(_bindata))
	for name := range _bindata {
		names = append(names, name)
	}
	return names
}

// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() ([]byte, error){
	"version/creator": version_creator,
	"version/version": version_version,
}
// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
//     data/
//       foo.txt
//       img/
//         a.png
//         b.png
// then AssetDir("data") would return []string{"foo.txt", "img"}
// AssetDir("data/img") would return []string{"a.png", "b.png"}
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
// AssetDir("") will return []string{"data"}.
func AssetDir(name string) ([]string, error) {
	node := _bintree
	if len(name) != 0 {
		cannonicalName := strings.Replace(name, "\\", "/", -1)
		pathList := strings.Split(cannonicalName, "/")
		for _, p := range pathList {
			node = node.Children[p]
			if node == nil {
				return nil, fmt.Errorf("Asset %s not found", name)
			}
		}
	}
	if node.Func != nil {
		return nil, fmt.Errorf("Asset %s not found", name)
	}
	rv := make([]string, 0, len(node.Children))
	for name := range node.Children {
		rv = append(rv, name)
	}
	return rv, nil
}

type _bintree_t struct {
	Func func() ([]byte, error)
	Children map[string]*_bintree_t
}
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
	"version/creator": &_bintree_t{version_creator, map[string]*_bintree_t{
	}},
	"version/version": &_bintree_t{version_version, map[string]*_bintree_t{
	}},
}}
